import jsonschema

data = {
    "message": "操作成功",
    "mobile": "18823749090",
}
schema1 = {
    "type": "object",
    "properties": {
        "message": {"pattern": "^操作"},
        "mobile": {"pattern": "^[0-9]{11}$"}
    },
    "required": ["message", "mobile"]
}
resp = jsonschema.validate(instance=data, schema=schema1)
print(resp)
